#ifndef XMLCONTENTHANDLER_H_
#define XMLCONTENTHANDLER_H_

#include <contenthandler.h> 
#include <parser.h>
#include "IXmlParserEx.h"

using namespace Xml;

class XmlContentHandler : public MContentHandler
{
public:
	XmlContentHandler();
	virtual ~XmlContentHandler();
	
public:
	void OnStartDocumentL( const RDocumentParameters &aDocParam,TInt aErrorCode );
	void OnEndDocumentL( TInt aErrorCode );
	void OnStartElementL( const RTagInfo &aElement,const RAttributeArray &aAttributes, TInt aErrorCode );
	void OnEndElementL( const RTagInfo &aElement, TInt aErrorCode );
	void OnContentL( const TDesC8 &aBytes, TInt aErrorCode );
	void OnStartPrefixMappingL( const RString &aPrefix, const RString &aUri,TInt aErrorCode );
	void OnEndPrefixMappingL( const RString &aPrefix, TInt aErrorCode );
	void OnIgnorableWhiteSpaceL( const TDesC8 &aBytes, TInt aErrorCode );
	void OnSkippedEntityL( const RString &aName, TInt aErrorCode );
	void OnProcessingInstructionL( const TDesC8 &aTarget, const TDesC8 &aData,TInt aErrorCode);
	void OnError( TInt aErrorCode );
	TAny *GetExtendedInterface( const TInt32 aUid );
	
protected:
	IXmlParserEx* iXmlParser;
	
public:
	virtual void ConstructL(TInt parserType,MContentHandler& contentHandler);
	virtual void ParseXmlL(const TDesC& aDes);
};

#endif /*XMLCONTENTHANDLER_H_*/
